//
//  ViewController.m
//  LYMViewAnimation
//
//  Created by lim on 2019/6/4.
//  Copyright © 2019年 lim. All rights reserved.
//

#import "ViewController.h"
#import "LYMViewAnimation.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIButton *btn1;
@property (nonatomic, strong) UIView *redView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIView *redView = [[UIView alloc] init];
    redView.frame = CGRectMake(100, 100, 100, self.view.frame.size.height);
    redView.backgroundColor = [UIColor greenColor];
    self.redView = redView;
}
- (IBAction)btn1ToClick:(UIButton *)sender {
    NSLog(@"---%d",1 << 1 | 1 << 4);
    
    
    if (sender.tag == 100) {
        
         LYMAnimationConfig *config = [LYMAnimationConfig new];
         config.lym_AnimationType = LYMAnimationTypeZoom;
         [[LYMViewAnimation shareLYMViewAnimation] lym_ShowPresentView:self.redView withConfg:config];
        
    } else if (sender.tag == 200) {
     
        LYMAnimationConfig *config = [LYMAnimationConfig new];
        config.lym_AnimationType = LYMAnimationTypeBottom;
        [[LYMViewAnimation shareLYMViewAnimation] lym_ShowPresentView:self.redView withConfg:config];
        
    } else if (sender.tag == 300) {
      
        LYMAnimationConfig *config = [LYMAnimationConfig new];
        config.lym_AnimationType = LYMAnimationTypeTop;
        [[LYMViewAnimation shareLYMViewAnimation] lym_ShowPresentView:self.redView withConfg:config];
        
    } else if (sender.tag == 400) {
     
        LYMAnimationConfig *config = [LYMAnimationConfig new];
        config.lym_AnimationType = LYMAnimationTypeLeft;
        [[LYMViewAnimation shareLYMViewAnimation] lym_ShowPresentView:self.redView withConfg:config];
        
    } else if (sender.tag == 500) {
        
        LYMAnimationConfig *config = [LYMAnimationConfig new];
        config.lym_AnimationType = LYMAnimationTypeRight;
        [[LYMViewAnimation shareLYMViewAnimation] lym_ShowPresentView:self.redView withConfg:config];
    }
   
}

@end
